public class TestDemo2 {
    public String[] findWords(String[] words) {
        String s = "12210111011122000010020202";
        StringBuilder sb = new StringBuilder();
        for(String str : words){
            str = str.toLowerCase();
            int[] arr = new int[3];
            for(int i = 0; i < str.length(); i++){
                int a = str.charAt(i) - 'a';
                arr[s.charAt(a-'0')]++;
            }
            for(int val : arr){
                if(val == str.length()){
                    sb.append(str+"");
                }
            }
        }
        return sb.toString().trim().split(" ");
    }
}
